home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / master / valid_read < prev    next >
Text File  |  2001-04-06  |  1KB  |  38 lines

  1. SYNOPSIS
  2.         string valid_read(string path, string uid, string func, object ob)
  3.  
  4. DESCRIPTION
  5.         This function is called to check if the object ob with the
  6.         user-id uid has read permissions for the file given by path
  7.         for the operation named by func. It should return 0 if
  8.         permission is denied, or the normalized path if permission is
  9.         granted. You can also return 1 to indicate that the path can
  10.         be used unchanged.
  11.  
  12.         The returned pathname must not contain ``..'', a leading /
  13.         will be stripped by the interpreter.
  14.  
  15.         Func denotes the efun call or other operation that caused
  16.         valid_read() to be called:
  17.  
  18.           copy_file
  19.           ed_start (check if the file to be edited is readable),
  20.           file_size,
  21.           get_dir,
  22.           print_file (efun cat()),
  23.           read_bytes,
  24.           read_file,
  25.           restore_object,
  26.           tail.
  27.  
  28.         For restore_object(), the <path> passed is the filename as given
  29.         in the efun call.
  30.  
  31.         This function is called in compat mode as well. If
  32.         you need to be compatible with the old 2.4.5-mudlib, redirect
  33.         these calls to the valid_read/valid_write in the user
  34.         object.
  35.  
  36. SEE ALSO
  37.         valid_write(M), make_path_absolute(M)
  38.